package org.blogsite.greencode.service.impl;

import java.io.File;
import java.util.List;

import org.blogsite.greencode.bean.TeachingSupport_Resource;
import org.blogsite.greencode.dao.TeachingSupport_ResourceDAO;
import org.blogsite.greencode.service.TeachingSupport_ResourceService;

/**
 * @author：wzj
 * E-mail: jsun789@gmail.com
 * @date：2010-7-31 下午06:28:05
 */
public class TeachingSupport_ResourceServiceImpl implements
		TeachingSupport_ResourceService {
	
	private TeachingSupport_ResourceDAO teachingSupportResourceDao;
	
	public TeachingSupport_ResourceDAO getTeachingSupportResourceDao() {
		return teachingSupportResourceDao;
	}
	public void setTeachingSupportResourceDao(
			TeachingSupport_ResourceDAO teachingSupportResourceDao) {
		this.teachingSupportResourceDao = teachingSupportResourceDao;
	}
	/*添加资源*/
	public void addResource(TeachingSupport_Resource teachingSupportResource) {
		teachingSupportResourceDao.addResource(teachingSupportResource);
	}
	/*设置上传文件的文件名*/
	public String generateFileName(String fileName) {
		
		return teachingSupportResourceDao.generateFileName(fileName);
	}
	/*查询所有资源*/
	public List getAllResource(){
		return teachingSupportResourceDao.getAllResource();
	}
	/*查询指定名称的资源*/
	public List getResourceByName(String name){
		return teachingSupportResourceDao.getResourceByName(name);
	}
	/*查询指定课程名资源*/
	public List getResourceByCname(String name){
		return teachingSupportResourceDao.getResourceByCname(name);
	}
	/*模糊查询资源*/
	public List getResourceByBlear(String text){
		return teachingSupportResourceDao.getResourceByBlear(text);
	}
	//修改资源信息
	public  void updateResource(TeachingSupport_Resource teachingSupportResource){
		
		teachingSupportResourceDao.updateResource(teachingSupportResource);
	}
	//删除资源信息
	public void deleteResource(TeachingSupport_Resource teachingSupportResource){
		
		teachingSupportResourceDao.deleteResource(teachingSupportResource);
	}
}
